package unit3_1012.test1;

public class Student {
	
	//学生的姓名和年龄
	private String name;
	private int age;
	
	public void  sing(String name) {
		/*
		 * 就近原则
		 */
		System.out.println(name);
	}
	
	public Student() {
		//this表示当前类；this(参数1，参数2，。。)调用了当前类的某个构造方法
		//this("李四", 10);
		this("张三");
	}
	//通过构造方法为属性赋值--this表示当前的对象
	public Student(String name,int age) {
		this.name=name;
		this.age=age;
	}
	
	public Student(String name) {
		
	}
	
	public  void  show(String name,int age) {
		//this.toString();
	}
	public void show(int name,String age) {
		
	}
	
	@Override
	public String toString() {
		return "Student [name=" + name + ", age=" + age + "]";
	}
	
	
	
	
	
}
